package benchmarks.tpch.mysql.queries;

import api.result.Result;
import api.connection.DBConnection;
import benchmarks.tpch.TPCHQuery;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public abstract class GenericQueryMySQL extends TPCHQuery {
    protected String queryName = "Null";
    protected String query;

    public Result run(DBConnection connection) {
        try {
            Connection conn = (Connection) connection.makeConnection();
            Statement statement = conn.createStatement();
            ResultSet rs = statement.executeQuery(query);
            conn.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
//        System.out.println(queryName + " ok");
        return null;
    }
}
